package com.xgjweb.common.action;

import org.springframework.web.struts.DispatchActionSupport;

/**
 * 
 * @author 谢国俊 日期：Oct 11, 2009
 */
public class XgjWebAction extends DispatchActionSupport {
	// 普通的返回名字
	protected static final String EXECUTE_SUCCESS_PATH = "execute_success_path";
	protected static final String EXECUTE_FAIL_PATH = "execute_fail_path";
	// 增，删，改，查,打印返回路径
	protected static final String INSERT_INIT_PATH = "insert_init_path";
	protected static final String UPDATE_INIT_PATH = "update_init_path";
	protected static final String VIEW_INIT_PATH = "view_init_path";
	protected static final String UPDATE_SUCCESS_PATH = "update_success_path";
	protected static final String INSERT_SUCCESS_PATH = "insert_success_path";
	protected static final String DELETE_SUCCESS_PATH = "delete_success_path";
	protected static final String PRINT_SUCCESS_PATH = "print_success_path";
	protected static final String VIEW_SUCCESS_PATH = "view_success_path";
	protected static final String CHART_SUCCESS_PATH = "chart_success_path";
	protected static final String QUERY_SUCCESS_PATH = "query_success_path";

	protected static final String UPDATE_FAIL_PATH = "update_fail_path";
	protected static final String INSERT_FAIL_PATH = "insert_fail_path";
	protected static final String DELETE_FAIL_PATH = "delete_fail_path";
	protected static final String PRINT_FAIL_PATH = "print_fail_path";
	protected static final String CHART_FAIL_PATH = "chart_fail_path";
	protected static final String QUERY_FAIL_PATH = "query_fail_path";
	protected static final String VIEW_FAIL_PATH = "view_fail_path";
	
	//执行标记
	protected static final String FLAG="flag";
	// 对是否初始化进行判断
	protected static final String UPDATE_INIT_FLAG = "initUpdate";
	protected static final String INSERT_INIT_FLAG = "initAdd";
	protected static final String VIEW_INIT_FLAG = "initView";
	/*
	 * protected static final String INSERT_FLAG = "insery"; protected static
	 * final String DELETE_FLAG = "delete"; protected static final String
	 * PRINT_FLAG = "print"; protected static final String CHART_FLAG = "chart";
	 */
	protected String parseMsg(String str){
		if(str==null)
			return "";
		else
			return str.split("_")[1];
	}
}
